﻿using AnesSystem.Models;
using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    class ConfigDapartmentDataGridViewModel : BaseViewModel<ConfigDapartmentDataGridViewModel>
    {
        #region Variables

        private ObservableCollection<ConfigDepartmentsModel> _configDepartmentsModels = new ObservableCollection<ConfigDepartmentsModel>();

        #endregion

        #region Constructor

        public ConfigDapartmentDataGridViewModel()
        {
            initConfigDepartmentsModel();
        }

        #endregion

        #region Properties

        public ObservableCollection<ConfigDepartmentsModel> ConfigDepartmentsModels
        {
            get
            {
                return _configDepartmentsModels;
            }

            set
            {
                _configDepartmentsModels = value;
                RaisePropertyChanged("ConfigDepartmentsModels");
            }
        }

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void initConfigDepartmentsModel()
        {
            IEnumerable<ConfigDepartmentsModel> list = ConfigDapartmentService.Instance.FindAll();
            foreach (var item in list)
            {
                _configDepartmentsModels.Add(item);

            }
        }


        #endregion

        #region Public/Protected Methods

        public override void Refresh()
        {
            initConfigDepartmentsModel();
        }

        #endregion

        #region EventHandlers

        #endregion

        #region Command

        #region ChangeDoctorCommand

        #endregion

        #region OpenPopupCommand

        #endregion
        #endregion


    }
}
